<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-browser;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <TargetFrameworks Condition="'$(NetCoreAppPrevious)' != ''">$(TargetFrameworks);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <!-- CS3011: Only CLS-compliant members can be abstract -->
    <!-- CS3019: CLS attributes on internal types. Some shared source files are internal in this project. -->
    <NoWarn>$(NoWarn);CS3011;CS3019</NoWarn>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <PackageDescription>Provides types for encoding and escaping strings for use in JavaScript, HyperText Markup Language (HTML), and uniform resource locators (URL).

Commonly Used Types:
System.Text.Encodings.Web.HtmlEncoder
System.Text.Encodings.Web.UrlEncoder
System.Text.Encodings.Web.JavaScriptEncoder</PackageDescription>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'browser'">$(DefineConstants);TARGET_BROWSER</DefineConstants>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="System\IO\TextWriterExtensions.cs" />
    <Compile Include="System\Text\Encodings\Web\AsciiByteMap.cs" />
    <Compile Include="System\Text\Encodings\Web\AllowedBmpCodePointsBitmap.cs" />
    <Compile Include="System\Text\Encodings\Web\OptimizedInboxTextEncoder.Ascii.cs" />
    <Compile Include="System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs" />
    <Compile Include="System\Text\Encodings\Web\DefaultUrlEncoder.cs" />
    <Compile Include="System\Text\Encodings\Web\DefaultJavaScriptEncoder.cs" />
    <Compile Include="System\Text\Encodings\Web\SpanUtility.cs" />
    <Compile Include="System\Text\Encodings\Web\ScalarEscaperBase.cs" />
    <Compile Include="System\Text\Encodings\Web\HtmlEncoder.cs" />
    <Compile Include="System\Text\Encodings\Web\DefaultHtmlEncoder.cs" />
    <Compile Include="System\Text\Encodings\Web\JavaScriptEncoder.cs" />
    <Compile Include="System\Text\Encodings\Web\TextEncoder.cs" />
    <Compile Include="System\Text\Encodings\Web\TextEncoderSettings.cs" />
    <Compile Include="System\Text\Encodings\Web\ThrowHelper.cs" />
    <Compile Include="System\Text\Encodings\Web\UrlEncoder.cs" />
    <Compile Include="System\Text\Unicode\UnicodeHelpers.cs" />
    <Compile Include="System\Text\Unicode\UnicodeHelpers.generated.cs" />
    <Compile Include="System\Text\Unicode\UnicodeRange.cs" />
    <Compile Include="System\Text\Unicode\UnicodeRanges.cs" />
    <Compile Include="System\Text\Unicode\UnicodeRanges.generated.cs" />
  </ItemGroup>

  <ItemGroup>
    <Compile Include="$(CoreLibSharedDir)System\Text\UnicodeDebug.cs" Link="System\Text\UnicodeDebug.cs" />
    <Compile Include="$(CoreLibSharedDir)System\Text\UnicodeUtility.cs" Link="System\Text\UnicodeUtility.cs" />
    <Compile Include="$(CommonPath)System\HexConverter.cs" Link="Common\System\HexConverter.cs" />
    <Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs" Link="Common\System\Text\ValueStringBuilder.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <Compile Include="System\Text\Encodings\Web\OptimizedInboxTextEncoder.Ssse3.cs" />
    <Compile Include="System\Text\Encodings\Web\OptimizedInboxTextEncoder.AdvSimd64.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
    <Compile Include="Polyfills\System.Numerics.BitOperations.netstandard20.cs" />
    <Compile Include="Polyfills\System.Text.Rune.netstandard20.cs" />
  </ItemGroup>

  <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))">
    <Reference Include="System.Memory" />
    <Reference Include="System.Numerics.Vectors" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.Intrinsics" />
    <Reference Include="System.Threading" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
    <PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
    <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
    <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" />
  </ItemGroup>

</Project>
